[#ftl]
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 lt8"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7 lt8"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8 lt8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="UTF-8" />
        <!-- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">  -->
        <title>后台管理系统登录</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
        <link rel="shortcut icon" href="${base}/Favicon.ico"> 
        <link rel="stylesheet" type="text/css" href="${base}/sresources/root/css/demo.css" />
        <link rel="stylesheet" type="text/css" href="${base}/sresources/root/css/style.css" />
		<link rel="stylesheet" type="text/css" href="${base}/sresources/root/css/animate-custom.css" />
		<link href="${base}/sresources/frame/jquery/jBox-master/Source/jBox.css" rel="stylesheet">
		<script src="${base}/sresources/frame/jquery/core/jquery-1.12.3.min.js" type="text/javascript"></script>
		<script src="${base}/sresources/frame/jquery/core/jquery-migrate-1.1.1.min.js" type="text/javascript"></script>
		<script src="${base}/sresources/frame/jquery/jBox-master/Source/jBox.min.js" type="text/javascript"></script>
    </head>
    <body>
    	[#if jsec.user()??]
    	<script type="text/javascript">
    			window.location="${base}/admin/frame.shtml";
    	</script>
    	[/#if]
    	<script type="text/javascript">
    		var box={
    			message:function(msg,color){
					new jBox('Notice', {
						content: msg,
						color:color,
						position:{
							x: 'center',
							y: 'center'
						}
						,attributes: { 
							x: 'center',
							y: 'center'
						}
					});
				}
    		};
    		
    		
    		$(function(){
    			$("#loginForm").submit(function(){
    				if(!$("#username").val()){
    					box.message("请输入用户名","red");
    					return false;
    				}
    				if(!$("#password").val()){
    					box.message("请输入密码","red");
    					return false;
    				}
    				var prms=$(this).serialize();
    				$.post($(this).attr("action"),prms,function(){
    					window.location="${base}/admin/frame.shtml";
    				}).fail(function(){
    					box.message("用户名或密码错误","red");
    				});
    				return false;
    			});
    		});
    	</script>
        <div class="container">
            <!-- Codrops top bar -->
            <div class="codrops-top">
                <a href="javaScript:void(0)">
                    <strong>&copy; 版权所有: </strong>Hector.Tong
                </a>
                <span class="right">
                    <a href="javaScript:void(0)">
                        <strong>欢迎使用Hector的管理系统</strong>
                    </a>
                </span>
                <div class="clr"></div>
            </div><!--/ Codrops top bar -->
            <header>
                <h1>管理系统登陆 <span>系统框架</span></h1>
				<nav class="codrops-demos">
					<span>点击<strong>"登陆"</strong>登陆到系统</span>
					<span><strong>测试用户：</strong>snake <strong>密码：</strong>111111</span>
					
				</nav>
            </header>
            <section>				
                <div id="container_demo" >
                    <!-- hidden anchor to stop jump http://www.css3create.com/Astuce-Empecher-le-scroll-avec-l-utilisation-de-target#wrap4  -->
                    <a class="hiddenanchor" id="tologin"></a>
                    <div id="wrapper">
                        <div id="login" class="animate form">
                            <form id="loginForm" action="${base}/login" autocomplete="off" method="post"> 
                                <h1>登录系统</h1> 
                                <p> 
                                    <label for="username" class="uname" data-icon="u" >登陆名：</label>
                                    <input id="username" name="username" oninvalid="setCustomValidity('请填写登录名')" autocomplete="off" type="text" placeholder="请输入您的系统登录用户名"/>
                                </p>
                                <p> 
                                    <label for="password" class="youpasswd" data-icon="p">密码：</label>
                                    <input id="password" name="password" oninvalid="setCustomValidity('请填写密码')" autocomplete="off" type="password" placeholder="请输入您的密码" /> 
                                </p>
                                <p class="keeplogin"> 
									<input type="checkbox" name="loginkeeping" id="loginkeeping" value="loginkeeping" /> 
									<label for="loginkeeping">记住我一个星期</label>
								</p>
                                <p class="login button"> 
                                    <input type="submit" value="登陆" /> 
								</p>
                                <p class="change_link">
									感谢您使用本系统
									<a href="mailto:spiniper@126.com" class="to_register">发送邮件给我</a>
								</p>
                            </form>
                        </div>
                    </div>
                </div>  
            </section>
        </div>
    </body>
</html>